package com.example.a3dlogin

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.jzp.rotate3d.Rotate3D
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        val rotate = Rotate3D.Builder(this)
                .setParentView(parent_ll)
                .setPositiveView(accountLoginLayout)
                .setNegativeView(phoneLoginLayout)
                .create()
        noPassLoginTv.setOnClickListener {
            rotate.transform() //启动Rotate3D
            if (rotate.isOpen) {
                noPassLoginTv.text = "使用免密登录"
            } else {
                noPassLoginTv.text = "使用账户登录"
            }
        }
    }
}